package com.lgy.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import com.lgy.model.User;

public interface UserRepository extends JpaRepository<User, Integer>,PagingAndSortingRepository<User, Integer>,JpaSpecificationExecutor<User> {
	@Query("from User u where u.name=:name")
	public List<User> findByUserName(@Param("name")String userName);

}
